home *** CD-ROM | disk | FTP | other *** search
- get/set VGAreg, a simple VGA register hacking program
- =====================================================
-
- This little tool is really included here for those who cannot resist to hack
- around with their VGA cards, without really having to know how to access
- them from Linux.
-
- It should be considered even MORE dangerous than SVGATextMode ;-) If that is
- possible...
-
- It is FAR from complete, and should get a complete re-write. But it helped
- me to test some stuff I needed for SVGATextMode. Anyone tempted to do better
- is hereby invited to do so.
-
- The syntax is quite easy:
-
-
- ./setVGAreg: version 0.6.4. (c) 1995 Koen Gadeyne (kmg@barco.be)
- Usage: ./setVGAreg [options] VGA_register_set [register_index] data
-
- Options: -h print usage information
- -n Don't program VGA hardware
- -d print debugging information
- -u unlock chipset-specific registers (needs /etc/TextConfig file)
- -p produce 'pipeable' decimal output (i.e. just the result, no text)
- -x produce 'pipeable' hex output (i.e. just the result, no text)
-
- VGA_register_set: any of CRTC, SEQ, ATRCTL, GRCTL, MISC.
- register_index: an index in the specified VGA_register_set,
- either in decimal (e.g. '24') or hex ('0x18') notation.
- Only needed when it is an indexed register (all except 'MISC').
- data: the data to program into the specified register.
-
-
-
- ./getVGAreg: version 0.6.4. (c) 1995 Koen Gadeyne (kmg@barco.be)
- Usage: ./getVGAreg [options] VGA_register_set [register_index]
-
- Options: -h print usage information
- -n Don't program VGA hardware
- -d print debugging information
- -u unlock chipset-specific registers (needs /etc/TextConfig file)
- -p produce 'pipeable' decimal output (i.e. just the result, no text)
- -x produce 'pipeable' hex output (i.e. just the result, no text)
-
- VGA_register_set: any of CRTC, SEQ, ATRCTL, GRCTL, MISC.
- register_index: an index in the specified VGA_register_set,
- either in decimal (e.g. '24') or hex ('0x18') notation.
- Only needed when it is an indexed register (all except 'MISC').
-
-
-
-
- An example get/setVGAreg session could be: ("> " denotes user input, the
- rest is output from the program)
-
- > getVGAreg CRTC 0x09
- VGA 'CRTC' register, index 9 (=0x9) contains 107 (=0x6b)
-
- > setVGAreg CRTC 0x09 0xeb
- VGA 'CRTC' register, index 9 (=0x9) contains 235 (=0xeb)
-
-
- Which will do something nice to your screen... ;-) (no harm done, don't be
- scared).
-
-
- The '-p' and '-h' options output just one number (the contents of the
- register). This is useful when used in a pipe, or in a script (this one was
- for an ET4000 special register, hence the '-u' flag for unlocking extended
- registers):
-
- #!/bin/bash
- ORIG31=`/sbin/getVGAreg -up CRTC 0x31`
- echo Original CRTC reg 0x31 contents: $ORIG31
- /sbin/setVGAreg -u CRTC 0x31 0x00
- /usr/bin/X11/XF86_SVGA
- /sbin/setVGAreg -u CRTC 0x31 $ORIG31
-
-
- WARNING: since different SVGA cards use different extra address ranges in any
- of the register sets, no checking is done to make sure you don't attempt to change
- a non-existing register!
-
- This is just a hacking tool! Use at your own risk. It was NOT intended to be
- idiot proof! If you don't understand all this, then don't bother trying to use it.
-
-